/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package network.packets;

import utils.Utils;

/**
 *
 * @author Kvest
 */
public class DistrictsUpdateServerTimeResponce extends Packet
{
    private long updateTime;
    
    public DistrictsUpdateServerTimeResponce(byte[] data)
    {
        super(DISTRICTS_UPDATE_SERVER_TIME_RESPONCE, data);
    }
    
    protected void parse(byte[] data)
    {
        byte[] timeData = new byte[8];
        System.arraycopy(data, 2, timeData, 0, timeData.length);
        updateTime = Utils.byteToLong(timeData);
    }
    
    public void print()
    {
        System.out.println("DistrictsUpdateServerTimeResponce[updateTime=" + updateTime + "]");
    }

    public long getUpdateTime() 
    {
        return updateTime;
    }
}
